package com.jingdianjichi.subject.common.enums;

import lombok.Getter;

/**
 * CategoryType   分类类型枚举
 *
 * @author 86178
 * @version 2024/03/17 21:03
 **/
@Getter
public enum CategoryTypeEnum {

    PRIMARY(1, "岗位大类"),
    SECOND(2, "二级分类");

    public int code;

    public String description;

    CategoryTypeEnum(int code, String description) {
        this.code = code;
        this.description = description;
    }

    public static CategoryTypeEnum getByCode(int codeVal) {
        for (CategoryTypeEnum resultCodeEnum : CategoryTypeEnum.values()) {
            if (resultCodeEnum.code == codeVal) {
                return resultCodeEnum;
            }
        }
        return null;
    }
}

